package com.chouren.goandroid.animate.effect;

public enum EffectType {
	
	FadeInEffect(FadeInEffect.class),
	FallEffect(FallEffect.class),
	FlipHEffect(FlipHEffect.class),
	FlipVEffect(FlipVEffect.class),
	NewsPaperEffect(NewsPaperEffect.class),
	RotateBottomEffect(RotateBottomEffect.class),
	RotateLeftEffect(RotateLeftEffect.class),
	ShakeEffect(ShakeEffect.class),
	SideFallEffect(SideFallEffect.class),
	SlideBottomEffect(SlideBottomEffect.class),
	SlideLeftEffect(SlideLeftEffect.class),
	SlideRightEffect(SlideRightEffect.class),
	SlideTopEffect(SlideTopEffect.class),
	SlitEffect(SlitEffect.class),
	SlideInFromBottomEffect(SlideInFromBottomEffect.class);
	
	private Class<?> clazz;
	
	private EffectType(Class<?> clazz) {
		this.clazz = clazz;
	}
	
	public BaseEffect getEffectAnimator() {
		try {
			return (BaseEffect) clazz.newInstance();
		} catch (Exception e) {
			e.printStackTrace();
			throw new Error("error when init EffectType");
		}
	}
}
